import request from '@/utils/request'

// 查询运费账单列表
export function listFreight(query) {
  return request({
    url: '/finance/freight/list',
    method: 'get',
    params: query
  })
}

// 查询运费账单详细
export function getFreight(freightBillId) {
  return request({
    url: '/finance/freight/' + freightBillId,
    method: 'get'
  })
}

// 新增运费账单
export function addFreight(data) {
  return request({
    url: '/finance/freight',
    method: 'post',
    data: data
  })
}

// 修改运费账单
export function updateFreight(data) {
  return request({
    url: '/finance/freight',
    method: 'put',
    data: data
  })
}

// 删除运费账单
export function delFreight(freightBillId) {
  return request({
    url: '/finance/freight/' + freightBillId,
    method: 'delete'
  })
}
